<template>
  <BorderBox13>
    <view class="item_title" v-if="title !== ''">
      <view class="zuo"></view>
      <text class="title-inner">&nbsp;&nbsp;{{ title }}&nbsp;&nbsp;</text>
      <view class="you"></view>
    </view>
    <view :class="title !== '' ? 'item_title_content' : 'item_title_content_def'">
      <slot></slot>
    </view>
  </BorderBox13>
</template>

<script setup>
import BorderBox13 from '../datav/border-box-13/border-box-13.vue'

const props = defineProps({
  title: {
    type: [Number, String],
    default: ''
  }
})
</script>

<style scoped lang="scss">
$item-title-height: 38px;
$item_title_content-height: calc(100% - 38px);

.item_title {
  height: $item-title-height;
  line-height: $item-title-height;
  width: 100%;
  color: #31abe3;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  .zuo,
  .you {
    width: 58px;
    height: 14px;
    background-image: url('/static/img/titles/zuo.png');
    background-size: contain;
    background-repeat: no-repeat;
  }

  .you {
    transform: rotate(180deg);
  }

  .title-inner {
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(92deg, #0072ff 0%, #00eaff 48.8525390625%, #01aaff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
  }
}

:deep(.dv-border-box-content) {
  box-sizing: border-box;
  padding: 6px 16px 0px;
}

.item_title_content {
  height: $item_title_content-height;
}

.item_title_content_def {
  width: 100%;
  height: 100%;
}
</style>

